import { baseUrl2 } from "./login2";
import customFetch from "@/utils/request";

// 获取首页顶部数据
export const getHomeTopData = () => {
  return customFetch(`${baseUrl2}/datalist`, {
    method: 'GET',
    headers: {
      'Authorization': `Bearer ${localStorage.getItem('adminToken2')}`
    }
  })
}

// 获取图表数据
export const getChartData = () => {
  return customFetch(`${baseUrl2}/chartdata`, {
    method: 'GET',
    headers: {
      'Authorization': `Bearer ${localStorage.getItem('adminToken2')}`
    }
  })
}
